package com.ruoyi.common.core.domain.order.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;


/**
 * 记录支付信息对象 pay_record
 *
 * @author ruoyi
 * @date 2025-06-16
 */
public class PayRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键编号 */
    private String id;

    /** 关联订单ID */
    @Excel(name = "关联订单ID")
    private String orderId;

    /** 订单流水号 */
    @Excel(name = "订单流水号")
    private String orderNo;

    /** 微信支付订单号 */
    @Excel(name = "微信支付订单号")
    private String transactionId;

    /** 用户openid */
    @Excel(name = "用户openid")
    private String openid;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal totalAmount;

    /** 支付方式（1.微信、2.余额） */
    @Excel(name = "支付方式", readConverterExp = "1=.微信、2.余额")
    private Long paymentMethod;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private String tradeState;

    /** 交易状态描述 */
    @Excel(name = "交易状态描述")
    private String tradeStateDesc;

    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 是否已退款（0:未退款，1:已退款） */
    @Excel(name = "是否已退款", readConverterExp = "0=:未退款，1:已退款")
    private Integer isRefund;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }

    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }

    public void setOrderNo(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo()
    {
        return orderNo;
    }

    public void setTransactionId(String transactionId)
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId()
    {
        return transactionId;
    }

    public void setOpenid(String openid)
    {
        this.openid = openid;
    }

    public String getOpenid()
    {
        return openid;
    }

    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }

    public void setPaymentMethod(Long paymentMethod)
    {
        this.paymentMethod = paymentMethod;
    }

    public Long getPaymentMethod()
    {
        return paymentMethod;
    }

    public void setTradeState(String tradeState)
    {
        this.tradeState = tradeState;
    }

    public String getTradeState()
    {
        return tradeState;
    }

    public void setTradeStateDesc(String tradeStateDesc)
    {
        this.tradeStateDesc = tradeStateDesc;
    }

    public String getTradeStateDesc()
    {
        return tradeStateDesc;
    }

    public void setPayTime(Date payTime)
    {
        this.payTime = payTime;
    }

    public Date getPayTime()
    {
        return payTime;
    }

    public void setIsRefund(Integer isRefund)
    {
        this.isRefund = isRefund;
    }

    public Integer getIsRefund()
    {
        return isRefund;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderId", getOrderId())
                .append("orderNo", getOrderNo())
                .append("transactionId", getTransactionId())
                .append("openid", getOpenid())
                .append("totalAmount", getTotalAmount())
                .append("paymentMethod", getPaymentMethod())
                .append("tradeState", getTradeState())
                .append("tradeStateDesc", getTradeStateDesc())
                .append("payTime", getPayTime())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isRefund", getIsRefund())
                .toString();
    }
}
